<script src="__PUBLIC__/js/common.js" type="text/javascript"></script>

 <script type="text/javascript">
  function clear_del()
  {
   if(confirm("确定全部数据库备份？"))
   {
	subform("<{:U('Database/backup')}>");
   }
  }
 </script>
 
 <include file="Admin:header" />
 
<table width="100%" height="31px" border="0" cellpadding="0" cellspacing="0" class="left_topbg" id="table2">
      <tr>
        <td height="31"><div class="titlebt">数据库管理</div></td>
      </tr>
    </table>

<div class="main">
    <div class="operate">
        <div class="left">
            <if condition='ACTION_NAME eq "index"'>
				<input type="button" onClick="return clear_del();" target="main" class="btn_blue" value="数据库备份">
                
				<input type="button" onClick="subform('__APP__/<{$module}>/Database/optimize/batchFlag/1')" class="btn_blue" value="数据表优化">
				<input type="button" onClick="subform('__APP__/<{$module}>/Database/repair/batchFlag/1')" class="btn_blue" value="数据表修复">
				
                <input type="button" onClick="window.open('__APP__/<{$module}>/Database/restore','main')" class="btn_green" value="还原管理">
            <else/>
                <input type="button" onClick="goUrl('{:U(GROUP_NAME. '/Database/index')}')" class="btn_blue" value="返回">
                <input type="button" onClick="doGoBatch('{:U(GROUP_NAME.'/Database/restore')}')" class="btn_green" value="还原">
                <input type="button" onClick="doConfirmBatch('{:U(GROUP_NAME.'/Database/clear')}', '确实要彻底删除选择项吗？')" class="btn_orange" value="彻底删除">
            </if>


            
        </div>
    </div>
    <div class="list">    
    <form action="__APP__/<{$module}>/Database/backup" method="post" id="form_do" name="form_do">
        <table width="100%">
            <tr>
				<th><input  name="chkall" type="checkbox" id="chkall" onClick="selectall(this.form)"></th>
                <th>表名</th>
                <th>表用途</th>
                <th>记录行数</th>
                <th>引擎</th>
                <th>字符集</th>
                <th>表大小</th>
                <th>操作</th>
            </tr>
			<foreach name='vlist' item='v'>
            <tr>
                <td><input type="checkbox" name="key[]" value="<{$v.name}>"></td>
                <td class="aleft"><{$v.name}></td>
                <td><{$v.comment}></td>
                <td><{$v.rows}></td>
                <td><{$v.engine}></td>
                <td><{$v.collation}></td>
                <td><{$v.size}></td>
                <td>
				
				<a href="__APP__/<{$module}>/Database/optimize/tablename/<{$v.name}>">优化</a>
				<a href="__APP__/<{$module}>/Database/repair/tablename/<{$v.name}>">修复</a>       
				</td>
            </tr>
            </foreach>
        </table>
        <div class="th" style="clear: both;">数据库中共有<{$tableNum}>张表，共计<{$total}></div>
    </form>
    </div>
</div>
<include file="Pubilc:copyright" />
</body>
</html>
